import  './401.js'
import  '../css/main.css'
import $ from './jquery.js'



$(function () {



    $.ajax({
        url: "http://192.168.30.63:3000/users/getUserInfo",
        type: "get",
        success(res) {
            if (res.code == 200) {
                console.log(res)
               let  use = res.user.username
               console.log(use)
                $(".uer").html(use)
                $(".yh").attr("src",`http://192.168.30.63:3000/images/${res.user.head}`)
            }
        }

    })




    $(".d ").click(function () {
        if ($(this).next().css("display") == "none") {
            $(this).next().css("display", "block")
        } else {
            $(this).next().css("display", "none")
        }
    })
    $("#t").click(function () {
        localStorage.removeItem("token")
        location.href = "./login.html"
    })

})
